#pragma once
#include "character.h"
#include "Pacman.h"
#include "comportement.h"


//#define iw_ghost 70
//#define ih_ghost 70
//#define tf_ghost "ghost.raw"


#define iw_ghost 256
#define ih_ghost 256
#define tf_ghost "tiles1.raw"
class Ghost :public Character
{
private :
   static const int GHOST_ALIVE=9;
   static const int GHOST_SLOW=10;
   static const int GHOST_DEAD=11;
  //static float SIZE = 0.5;
	int number;
	int startCounter;
	float distanceFromPacman;


	float speed;
	int next1;
	int next2;
	int next3;
	int next4;
	bool turnMode;
	Pacman * pacman;
	int comportement;

public:
	Ghost(float x, float z,float angle,float width, Field *field, Pacman * pacman, int number) ;
	~Ghost(void);

	static void init();
	static void lectureTexture(char *fichier,int dx,int dy);
	void display();
	void action();


	void buildLivingGhost();
	void buildDeadGhost();

	int followMode();
	int randomMode();
	int returnMode();
	int getOutMode();
	void resetRandomDirection();

	float getDistanceFromPacman();
	void setDistanceFromPacman(float d);
	int getComportement();
	void setComportement(int c);

};

